<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>合同定制->定制</title>
    <link href="css/style.css" rel="stylesheet">
    <style>
        .icon {
            min-height: 200px;
            padding: 10px;
            position: relative;
        }

        .icon1 {
            width: 99%;
            min-height: 180px;
            padding: 10px;
            position: relative;
        }
    </style>

    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" >
        $(function () {
            $("#download").on("click", function () {
                $("#contract").attr("action","/contract/customServiceDownload");
                $("#contract").submit();
            });
            $("#preview").on("click", function () {
                $("#contract").attr("action","/contract/customServicePreview");
                $("#contract").submit();
            });
        });

    </script>
</head>

<body>
<div style="height: 80px;">
    <div style="float: right;">
        <button id="download" class="btn ant-btn ant-btn-red">一键生成</button>
        <button id="preview" class="btn ant-btn ant-btn-red">在线预览</button>
    </div>
</div>
<div style="border: solid 1px rgb(189, 189, 189);padding: 10px;">
    <div style="text-align: center;">
        <h2 th:text="${contract.name}+'-合同定制'">保密协议-合同定制</h2>
    </div>
    <form id="contract" method="POST" target="_top">
    <div th:each="contractItem:${contract.contractSteps[0].contractItems}" class="icon" style="margin-bottom: 10px;">
        <textarea th:name="'contractSteps[0].contractItems['+${#strings.toString(contractItemStat.index)}+'].attributeValue'"
                  th:text="${contractItem.attributeValue}"
                cols="10" rows="10" class="icon1">合同内容</textarea>
        <div style="position: absolute;right: 0px;bottom: 0px;">
            <input type="submit" value="保存" class="btn ant-btn ant-btn-red" />
            <input type="submit" value="修改" class="btn ant-btn ant-btn-red" />
        </div>
    </div>
    <input name="name" type="hidden" th:value="${contract.name}"/>
    </form>
</div>
</body>

</html>